﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Rison.Web.Common;
using Rison.BusinessFacade.Entity.Biz;
using Rison.BusinessFacade.Facade.Biz;
using Rison.BusinessFacade.Common;
using Rison.BusinessFacade.Helper;
namespace Rison.Web.view
{
    public partial class SQListDetail : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["key"]))
                    LoadInfo();
            }
        }


        private void LoadInfo()
        {
            string infoId = Request.QueryString["key"];

            InfosReaderFacade facade = new InfosReaderFacade("zxsq");

            DataRow row = facade.ReadSuqiuDetail(infoId);
            if (row != null)
            {
                labSubject.Text = StringHelper.GetValue(row, "title");
                //labRQ.Text = Convert.ToDateTime(row["SubmitTime"]).ToString("yyyy年MM月dd日");
                if (!string.IsNullOrEmpty(row["ShowTime"].ToString()))
                labRQ.Text = Convert.ToDateTime(row["ShowTime"]).ToString("yyyy年MM月dd日");


                labType.Text = StringHelper.GetValue(row, "subTitle");
                labContent.Text = StringHelper.GetValue(row, "Description");
                labDepartment.Text = StringHelper.GetValue(row, "Source");{}
                //回复才显示回复信息
                //if (row["ispublished"].ToString() == "1")
                //{
                //    if (row["CompleteTime"] is System.DBNull)
                //    {
                //    }
                //    else { LabCompleteTime.Text = Convert.ToDateTime(row["PublishTime"]).ToString("yyyy年MM月dd日"); }
                //    labResponse.Text = StringHelper.GetValue(row, "response");
                //}
                if (!string.IsNullOrEmpty(row["PublishTime"].ToString()))
                 LabCompleteTime.Text = Convert.ToDateTime(row["PublishTime"]).ToString("yyyy年MM月dd日");

                 labResponse.Text = StringHelper.GetValue(row, "content");
            }
           
        }

    }
}
